package com.googlecode.springgameengine.resource;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Maciej
 */
public class ResourceLoaderMap extends ResourceLoaderResolver {
	
	private Map<Class<? extends ResourceDescriptor>, ResourceLoader> resourceLoaderMap = new HashMap<>();
	
	@Override
	public ResourceLoader resolve(ResourceDescriptor resourceDescriptor) {
		return resourceLoaderMap.get(resourceDescriptor.getClass());
	}

	public Map<Class<? extends ResourceDescriptor>, ResourceLoader> getResourceLoaderMap() {
		return resourceLoaderMap;
	}

	public void setResourceLoaderMap(Map<Class<? extends ResourceDescriptor>, ResourceLoader> resourceLoaderMap) {
		this.resourceLoaderMap = resourceLoaderMap;
	}
	
}
